<!DOCTYPE html>
<html>
<head>
<title>LiteAdmin安装向导</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="/static/install/css/app.css">
<script src="/static/js/jquery-3.7.0.min.js"></script>
</head>
<body>

    <div class="container">
		<div class="header">
			<div class="">
				<h1 class="brand"><img class="logo" src="/static/images/logo-mini.png" alt=""> LiteAdmin</h1>
				<div class="title">安装</div>
			</div>
		</div>

<div class="content" style="padding-top: 0px;">
	<div class="container">
		<div class="row">

			<div class="step-group">
	            
	    	</div>

			<div class="col-md12">
				<div class="card fixed">
					<div class="card-header">
						<span class="card-version">{:config('app.version')}</span>
					</div>
					<div class="card-body">
						<div class="install">
							<div class="tips">正在安装，请勿刷新...</div>
						</div>
						<div class="complete" style="display: none">
							<div class="success">安装成功</div>
							<blockquote class="elem-quote text" style="border-left: 0px;text-align: left;margin-bottom: 30px;">
							  1. <a href="/" target="_blank">请不要将后台地址泄露给他人，如有泄露请及时修改</a><br/>
							  2. <a href="/" target="_blank" class="admin">后台地址：</a><br>
							  3. 系统默认管理员账号为：admin
							</blockquote>
							
						</div>
		    		</div>
					</div>
				</div>
			</div>
		</div>
    </div>
    <div class="footer">copyright © 2023 LiteAdmin all rights reserved.</div>
</div>
<style>.footer{    
		position: revert;
        padding: 0px;
    }</style>

</body>

<script type="text/javascript">
	

		// 随机字符串
		function randomString(len) {
		　　len = len || 32;
		　　var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
		　　var maxPos = $chars.length;
		　　var pwd = '';
		　　for (i = 0; i < len; i++) {
		　　　　pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
		　　}
		　　return pwd;
		}

		// 加载数据信息
		$.get('/install/index/install',{},function(res){
			if (res.code === 200) {
				$('.install').remove();
				var admin = $('.admin');
				admin.attr('href','/super/index.html');
				admin.html('后台地址：http://'+ location.host +'/super/index.html');
				$('.btn-admin').attr('href','/super/index.html');
				$('.complete').show();
				$.get('/install/index/clear',{},function(res){});
			} else {
			    cocoMessage.error(res.msg,3000);
			}
		});
	
</script>
</html>